{# Copyright The IETF Trust 2015-2025, All Rights Reserved #}
{% load origin %}
{% origin %}
{% load ietf_filters managed_groups wg_menu active_groups_menu group_filters cache meetings_filters %}
{% if flavor != 'top' %}
    {% include "base/menu_user.html" %}
{% endif %}
<li class="nav-item dropdown">
    {% if flavor == "top" %}
        <a href="#"
           class="nav-link dropdown-toggle"
           role="button"
           data-bs-toggle="dropdown"
           aria-expanded="false">
            Groups
        </a>
        <ul class="dropdown-menu {% if flavor == 'top' %}mt-n1{% else %}ms-n1{% endif %}">
        {% else %}
            <span class="fw-bolder">Groups</span>
        </li>
    {% endif %}
    {% if flavor == 'top' %}<li class="dropdown-header">By area/parent</li>{% endif %}
    {% wg_menu flavor %}
    <li class="dropend">
        <a class="dropdown-item dropdown-toggle {% if flavor != 'top' %}text-wrap{% endif %}"
           href="{% url "ietf.group.views.active_groups" %}">
            Other
        </a>
        {% active_groups_menu flavor %}
    </li>
    {% if flavor == 'top' %}<li><hr class="dropdown-divider"></li>{% endif %}
    <li {% if flavor == 'top' %}class="dropdown-header"{% else %}class="nav-item fw-bolder"{% endif %}>New work</li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.group.views.chartering_groups" %}">
            Chartering groups
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.group.views.bofs" group_type="wg" %}">
            BOFs
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.doc.views_bofreq.bof_requests" %}">
            BOF Requests
        </a>
    </li>
    {% if flavor == 'top' %}<li><hr class="dropdown-divider"></li>{% endif %}
    <li {% if flavor == 'top' %}class="dropdown-header"{% else %}class="nav-item fw-bolder"{% endif %}>Other groups</li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.group.views.concluded_groups" %}">
            Concluded groups
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.mailinglists.views.nonwg' %}">
            Non-WG lists
        </a>
    </li>
    {% if flavor == "top" %}
    </ul>
</li>
{% endif %}
<li class="nav-item dropdown">
    {% if flavor == "top" %}
        <a href="#"
           class="nav-link dropdown-toggle"
           role="button"
           data-bs-toggle="dropdown"
           aria-expanded="false">
            Documents
        </a>
        <ul class="dropdown-menu {% if flavor == 'top' %}mt-n1{% else %}ms-n1{% endif %}">
        {% else %}
            <span class="fw-bolder">Documents</span>
        </li>
    {% endif %}
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.doc.views_search.search" %}">
            Search
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.doc.views_search.recent_drafts" %}">
            Recent I-Ds
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.submit.views.upload_submission" %}">
            Submit an Internet-Draft
        </a>
    </li>
    {% if user and user.is_authenticated %}
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
            href="{% url "ietf.community.views.view_list" user.username %}">
            My tracked docs
        </a>
    </li>
    {% if user|has_role:"Area Director,Secretariat" %}
        {% if flavor == 'top' %}<li><hr class="dropdown-divider"></li>{% endif %}
        <li>
            <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
                href="{% url 'ietf.doc.views_status_change.rfc_status_changes' %}">
                RFC status changes
            </a>
        </li>
    {% endif %}
    {% if flavor == 'top' %}<li><hr class="dropdown-divider"></li>{% endif %}
    <li class="dropend">
      <a class="dropdown-item dropdown-toggle" href="#">
        IESG
      </a>
      <ul class="dropdown-menu">
            <li>
                <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
                href="{% url 'ietf.group.views.appeals' acronym='iesg' %}">
                    IESG appeals
                </a>
            </li>
            <li>
                <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
                href="{% url 'ietf.doc.views_search.ad_workload' %}">
                    IESG dashboard
                </a>
            </li>
            <li>
                <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
                href="{% url 'ietf.group.views.statements' acronym='iesg' %}">
                    IESG statements
                </a>
            </li>
        </ul>
        </li>
        <li><hr class="dropdown-divider"></li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
            href="{% url 'ietf.doc.views_ballot.irsg_ballot_status' %}">
            IRSG ballot status
        </a>
    </li>
        {% if user|has_role:"WG Chair,RG Chair" %}
            {% if flavor == 'top' %}<li><hr class="dropdown-divider"></li>{% endif %}
            <li {% if flavor == 'top' %}class="dropdown-header"{% else %}class="nav-item fw-bolder"{% endif %}>Manage</li>
            <li>
                <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
                   href="{% url "ietf.submit.views.approvals" %}">
                    Approve an I-D
                </a>
            </li>
            {% for g in user|docman_groups %}
                <li>
                    <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
                       href="{% url "ietf.group.views.group_documents" g.acronym %}">
                        {{ g.acronym }} {{ g.type_id }} docs
                    </a>
                </li>
            {% endfor %}
        {% endif %}
        {% if user|has_role:"Review Team Secretary" %}
            {% if flavor == 'top' %}
                <li><hr class="dropdown-divider">
                </li>
            {% endif %}
            <li {% if flavor == 'top' %}class="dropdown-header"{% else %}class="nav-item fw-bolder"{% endif %}>
            	Review Teams
            </li>
            {% for g in user|managed_review_groups %}
                <li>
                    <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
                       href="{% url "ietf.group.views.review_requests" g.acronym %}">
                        {{ g.acronym }} reviews
                    </a>
                </li>
            {% endfor %}
        {% endif %}
        {% with user|active_nomcoms as nomcoms %}{% if nomcoms %}
            {% if flavor == 'top' %}
                <li><hr class="dropdown-divider">
                </li>
            {% endif %}
            <li {% if flavor == 'top' %}class="dropdown-header"{% else %}class="nav-item fw-bolder"{% endif %}>
            	NomComs
            </li>
            {% for nomcom in nomcoms %}
                <li>
                    <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
                       href="{% url "ietf.nomcom.views.private_index" nomcom.year %}">
                        {{ nomcom|capfirst }}
                    </a>
                </li>
            {% endfor %}
        {% endif %}{% endwith %}
    {% endif %}
    {% if flavor == 'top' %}
        <li><hr class="dropdown-divider">
        </li>
    {% endif %}
    <li {% if flavor == 'top' %}class="dropdown-header"{% else %}class="nav-item fw-bolder"{% endif %}>
        RFC streams
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.group.views.stream_documents" acronym="iab" %}">
            IAB
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.group.views.stream_documents" acronym="irtf" %}">
            IRTF
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.group.views.stream_documents" acronym="ise" %}">
            ISE
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.group.views.stream_documents" acronym="editorial" %}">
            Editorial
        </a>
    </li>
    {% if flavor == 'top' %}
        <li><hr class="dropdown-divider">
        </li>
    {% endif %}
    <li {% if flavor == 'top' %}class="dropdown-header"{% else %}class="nav-item fw-bolder"{% endif %}>
        Subseries
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.doc.views_search.index_subseries" type_id="std" %}">
            STD
        </a>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.doc.views_search.index_subseries" type_id="bcp" %}">
            BCP
        </a>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.doc.views_search.index_subseries" type_id="fyi" %}">
            FYI
        </a>
    </li>
    {% if flavor == 'top' %}
    </ul>
</li>
{% endif %}
<li class="nav-item dropdown">
    {% if flavor == "top" %}
        <a href="#"
           class="nav-link dropdown-toggle"
           role="button"
           data-bs-toggle="dropdown"
           aria-expanded="false">
            Meetings
        </a>
        <ul class="dropdown-menu {% if flavor == 'top' %}mt-n1{% else %}ms-n1{% endif %}">
        {% else %}
            <span class="fw-bolder">
                Meetings
            </span>
        </li>
    {% endif %}
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'agenda' %}">
            Agenda
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.meeting.views.materials' %}">
            Materials
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'floor-plan' %}">
            Floor plan
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="https://www.ietf.org/how/meetings/register/">
            Registration
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.meeting.views.important_dates' %}">
            Important dates
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.meeting.views_session_request.list_view' %}">
            Request a session
        </a>
    </li>
    {% if user|can_request_interim %}
        <li>
            <a class="dropdown-item {% if flavor != 'top' %}text-wrap link-primary{% endif %}"
                href="{% url 'ietf.meeting.views.interim_request' %}">
                Request an interim meeting
            </a>
        </li>
    {% endif %}
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.meeting.views.meeting_requests' %}">
            Session requests
        </a>
    </li>
    {% if user|matman_groups %}
        {% if flavor == 'top' %}<li><hr class="dropdown-divider"></li>{% endif %}
        <li {% if flavor == 'top' %}class="dropdown-header"{% else %}class="nav-item fw-bolder"{% endif %}>Manage</li>
        {% for g in user|matman_groups %}
            <li>
                <a class="dropdown-item {% if flavor != 'top' %}text-wrap link-primary{% endif %}"
                    href="{% url "ietf.group.views.meetings" g.acronym %}">
                    {{ g.acronym }} {{ g.type_id }} meetings
                </a>
            </li>
        {% endfor %}
    {% endif %}
    {% if flavor == 'top' %}
        {% if flavor == 'top' %}
            <li><hr class="dropdown-divider">
            </li>
        {% endif %}
        <li {% if flavor == 'top' %}class="dropdown-header"{% else %}class="nav-item fw-bolder"{% endif %}>
            Upcoming meetings
        </li>
    {% endif %}
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.meeting.views.upcoming' %}">
            Upcoming meetings
        </a>
    </li>
    {% if flavor == 'top' %}
        {% if flavor == 'top' %}
            <li><hr class="dropdown-divider">
            </li>
        {% endif %}
        <li {% if flavor == 'top' %}class="dropdown-header"{% else %}class="nav-item fw-bolder"{% endif %}>
            Past meetings
        </li>
    {% endif %}
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.meeting.views.past' %}">
            Past meetings
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="https://www.ietf.org/how/meetings/past/">
            Meeting proceedings
        </a>
    </li>
    {% if flavor == 'top' %}
    </ul>
</li>
{% endif %}
<li class="nav-item dropdown">
    {% if flavor == "top" %}
        <a href="#"
           class="nav-link dropdown-toggle"
           role="button"
           data-bs-toggle="dropdown"
           aria-expanded="false">
            Other
        </a>
        <ul class="dropdown-menu {% if flavor == 'top' %}mt-n1{% else %}ms-n1{% endif %}">
        {% else %}
            <span class="fw-bolder">
                Other
            </span>
        </li>
    {% endif %}
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.ipr.views.showlist' %}">
            IPR disclosures
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.liaisons.views.liaison_list' %}">
            Liaison statements
        </a>
    </li>
    {% if user|has_role:"Secretariat,IAB,Liaison Manager,Liaison Coordinator" %}
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.liaisons.views.list_other_sdo' %}">
            List of other SDO groups
        </a>
    </li>
    {% endif %}
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.iesg.views.agenda' %}">
            IESG agenda
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.nomcom.views.index' %}">
            NomComs
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.doc.views_downref.downref_registry' %}">
            Downref registry
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url "ietf.stats.views.stats_index" %}">
            Statistics
        </a>
        <ul class="dropdown-menu {% if flavor == 'top' %}mt-n1{% else %}ms-n1{% endif %}">
            <li>
                <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
                   href="{% url 'ietf.stats.views.document_stats' %}">
                    I-Ds/RFCs
                </a>
            </li>
            <li>
                <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
                   href="{% url 'ietf.stats.views.meeting_stats' %}">
                    Meetings
                </a>
            </li>
            {% if user and user.is_authenticated %}
                <li>
                    <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
                       href="{% url 'ietf.stats.views.review_stats' %}">
                        Reviews
                    </a>
                </li>
            {% endif %}
        </ul>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.api.views.api_help' %}">
            API Help
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           href="{% url 'ietf.release.views.release' %}">
            Release notes
        </a>
    </li>
    <li>
        <a class="dropdown-item{% if flavor != 'top' %} text-wrap{% endif %}"
           target="_blank" href="https://status.ietf.org">
            System status
        </a>
    </li>
    {% if flavor == 'top' %}
        <li><hr class="dropdown-divider">
        </li>
    {% endif %}
    <li>
        <a class="dropdown-item text-danger {% if flavor != 'top' %}text-wrap{% endif %}"
           target="_blank" href="https://github.com/ietf-tools/datatracker/issues/new/choose">
            <i class="bi bi-bug">
            </i>
            Report a bug
        </a>
    </li>
    {% if flavor == 'top' %}
    </ul>
</li>
{% endif %}
{% if flavor == 'top' %}
    {% include "base/menu_user.html" %}
{% endif %}
